/**
 * Created by Administrator on 2015/12/29.
 */
angular.module('yhzx.controller',[])
  .controller('yhzxCtrl',['$scope','yhzxService','$localstorage',function($scope,yhzxService,$localstorage){

    $scope.showTab = 'tab-1';
    //切换tab页
    $scope.selectTab = function(_tab){
      $scope.showTab = _tab;
      if(_tab=="tab-1")
      {
      }
    };

    $scope.$on('$ionicView.enter', function(event, data) {
      if($localstorage.get("LOG_FLAG")=="1"){
        yhzxService.insertLog("用户中心").then(function(data){
          console.log("插入日志"+angular.toJson(data));
        },function(error){
          console.log("插入日志失败，请联系管理员");
        });
      }

    });
  }]);
